var PersonLiableShow = function () {
  var template = /* html */ `
    <div class="person-liable-show">
      <div style="margin-right:10px" v-if="!readonly">
        <el-button size="mini" type="primary" @click="resetPersonLiable">设置责任人</el-button>
      </div>
      <div v-else style="width:100%;font-size:18px">责任人</div>
      <div v-for="person in order.personLiableList" :key="'person_'+person.id" class="person-item">
        {{person.name}}:{{person.share}}%
      </div>
    </div>
  `;

  return {
    props: {
      order: {
        type:Object,
        required: true
      },
      readonly:{
        type:Boolean,
        defualt:false
      }
    },

    data: function () {
      return {};
    },

    methods:{
      resetPersonLiable:function(){
        var id = this.order.parentId;
        this.$emit('btn-click',id);
      }
    },

    template: template
  };
}();
